/*
 * FindAndUnion.h
 *
 *  Created on: Apr 4, 2014
 *      Author: zby
 */

#ifndef FINDANDUNION_H_
#define FINDANDUNION_H_

class FindAndUnion{
    //private:
    public:
        int *id;
        int root(int x);
        const int len;
    public:
        bool unite(int p, int q);
        bool ifTheSameRoot(int p, int q);
        FindAndUnion(int len);
        FindAndUnion(const FindAndUnion & fau);
        ~FindAndUnion();
};

#endif /* FINDANDUNION_H_ */
